/*
 *  ATimeWarp.cpp
 *  libavid
 *
 *  Created by Peter on 26.02.12.
 *  Copyright 2012 __MyCompanyName__. All rights reserved.
 *
 */

#include "ATimeWarp.h"
#include "AStream.h"

A_IMPLEMENT_CLASS( 'WARP', ATimeWarp, ATrackGroup );

void ATimeWarp::readFromStream( AStream& str, const AObjDoc& objd )
{
	ATrackGroup::readFromStream( str, objd );
	
	UInt8 tagMark, version;
	str.readPod( tagMark );
	str.readPod( version );
	TR_ASSERT( tagMark == 0x02 );
	TR_ASSERT( version == 0x02 ),
	
	str.readPod( _phaseOffset );
}

void ATimeWarp::dump( std::ostream& str ) const
{
	str << "ATimeWarp {" << std::endl;
	
	str << "\t";
	ATrackGroup::dump( str );
	
	str << "\t_phaseOffset: " << _phaseOffset << std::endl;
	
	str << "}" << std::endl;
}